<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生管理页面</title>
    <link rel="stylesheet" href="../../webapp/css/font-awesome.min.css">
    <link rel="shortcut inco" href="../../webapp/img/logo.png" type="image/png"/>
    <link rel="stylesheet" href="../../webapp/css/style.css">
    <link rel="stylesheet" href="../../webapp/css/index.css">
    <link rel="stylesheet" href="../../webapp/css/model.css">
    <script type="text/javascript" src="../../webapp/js/jquery-3.6.0.min.js"></script>
</head>
<body>
<div class="container web-font">
    <div class="title">
        <h3 class="web-font">学生基本信息列表</h3>
        <div class="login-user" id="login-user">
            <span>r</span>
            <div class="login-user-option" id="user-option">
                <li><a href="javascript:;" id="open-upload"><i class="fa fa-upload"></i> 数据导入</a></li>
                <li><a href="#"><i class="fa fa-download"></i> 数据导出</a></li>
                <li><a href="#"><i class="fa fa-sign-out"></i> 退出登录</a></li>
            </div>
        </div>
    </div>
    <div class="headers">
        <button class="me-add-user" id="open-add">添加</button>

        <form action="/student?action=search" method="post">
            <input type="text" required="required" placeholder="输入学生姓名进行查询" name="key">
            <div class="underline"></div>
            <i class="fa fa-search"></i>
            <input type="submit" value="查询"/>
        </form>
    </div>
    <nav>
        <a href="#"><i class="fa fa-arrow-left"></i> 返回</a>
    </nav>
    <table>
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>身高</th>
            <th>体重</th>
            <th>年龄</th>
            <th>爱好</th>
            <th>操作</th>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
        <tr>
            <td>1</td>
            <td>
                <input type="text" value="小明" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="男" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="177" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="80" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="30" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <input type="text" value="篮球" disabled="disabled"/>
                <i class="fa fa-edit"></i>
            </td>
            <td>
                <button data-id="1" data-code="202013294" class="me-upload">提交</button>
                <button class="me-delete">删除</button>
            </td>
        </tr>
    </table>
    <!--    <div class="me-empty">-->
    <!--        <img src="../img/empty.png" />-->
    <!--    </div>-->
    <div class="pagination">
        <a href="#">上一页</a>
        <sapn>共52条数据 当前1/5页</sapn>
        <a href="#">上一页</a>
    </div>
</div>

<div class="model-background">
    <div class="model" style="display: none;" id="add-stu">
        <div class="title">
            <h1>添加学生信息</h1>
            <i class="fa fa-close" id="close-model"></i>
        </div>
        <form action="#" method="post">
            <div class="box">
                <input type="text" required="required" name="name">
                <div class="underline"></div>
                <label class="info">学生姓名</label>
            </div>
            <div class="box">
                <label><input type="radio" checked="checked" value="0" name="sex">男</label>
                <label><input type="radio" value="1" name="sex">女</label>
            </div>
            <div class="box">
                <input type="text" required="required" name="height">
                <div class="underline"></div>
                <label class="info">学生身高</label>
            </div>
            <div class="box">
                <input type="text" required="required" name="weight">
                <div class="underline"></div>
                <label class="info">学生体重</label>
            </div>
            <div class="box">
                <input type="text" required="required" name="age">
                <div class="underline"></div>
                <label class="info">学生年龄</label>
            </div>
            <div class="box">
                <input type="text" required="required" name="love">
                <div class="underline"></div>
                <label class="info">学生爱好</label>
            </div>
            <div class="me-add-option">
                <label><i class="fa fa-plus"></i><input type="submit" value="添加"></label>
                <label><i class="fa fa-hand-pointer-o"></i><input type="reset" value="重置"></label>
            </div>
        </form>
    </div>

    <div class="model" style="display: none;" id="upload-stu">
        <div class="title">
            <h1>上传学生数据</h1>
            <i class="fa fa-close" id="close-model"></i>
        </div>
        <form action="#" method="post">
            <div class="box" style="height: 170px;">
                <div class="upload" id="my-file">
                    <i class="fa fa-cloud-upload"></i>
                    <span>点击上传Excel文件</span>
                    <input class="file-input" name="data"
                           accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                           type="file" hidden>
                </div>
                <div class="list-file">
                </div>
            </div>
            <div class="me-add-option">
                <label><i class="fa fa-upload"></i><input type="submit" value="上传" id="submit"></label>
                <label><i class="fa fa-hand-pointer-o"></i><input type="reset" value="重置" id="reset"></label>
            </div>
        </form>
    </div>
</div>

<script>
    $("table .me-upload").click(function () {
        console.log(this.dataset.id);
        console.log(this.dataset.code)
        console.log(this.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.childNodes[1].value)
        console.log(this.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.childNodes[1].value)
        console.log(this.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.childNodes[1].value)
        console.log(this.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.childNodes[1].value)
        console.log(this.parentNode.previousElementSibling.previousElementSibling.childNodes[1].value)
        console.log(this.parentNode.previousElementSibling.childNodes[1].value)
    })

</script>
<script type="text/javascript" src="../../webapp/js/index.js"></script>
</body>
</html>